using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// 对象池
/// </summary>
public class GameObjectPool
{
    /// <summary>
    /// 单例模式:不用MonoBehaviour
    /// </summary>
    private static GameObjectPool instance;
    public static GameObjectPool Instance
    {
        get
        {
            if (instance == null)
            {
                instance = new GameObjectPool();
            }
            return instance;
        }
        set
        {
            if (instance != null)
            {
                Debug.LogError("单例模式重复创建：GameObjectPool");
                return;
            }
            instance = value;
        }
    }
    //字典：对象映射
    public Dictionary<string, List<GameObject>> cache = new Dictionary<string, List<GameObject>>();
    
}